.\" SPDX-License-Identifier: BSD-2-Clause
.\" Copyright (C) 2021 Intel Corporation.
.\"
.TH "MEMKIND_MEMTIER" 3 "2021-03-01" "Intel Corporation" "MEMKIND_MEMTIER" \" -*- nroff -*-
.SH "NAME"
memkind_memtier \- memory tiering interface
.br
.BR Note:
.I memkind_memtier.h
functionality is considered as stable API (STANDARD API).
.SH "SYNOPSIS"
.nf
.B #include <memkind_memtier.h>
.sp
.B Link with -lmemkind
.sp
.B "TIER MANAGEMENT:"
.sp
.BI "struct memtier_builder *memtier_builder_new(memtier_policy_t " "policy" );
.br
.BI "void memtier_builder_delete(struct memtier_builder " "*builder" );
.br
.BI "int memtier_builder_add_tier(struct memtier_builder " "*builder" ", memkind_t " "kind" ", unsigned " "kind_ratio" );
.br
.BI "struct memtier_memory *memtier_builder_construct_memtier_memory(struct memtier_builder " "*builder" );
.br
.BI "void memtier_delete_memtier_memory(struct memtier_memory " "*memory" );
.sp
.B "HEAP MANAGEMENT:
.br
.BI "void *memtier_malloc(struct memtier_memory " "*memory" ", size_t " "size" );
.br
.BI "void *memtier_kind_malloc(memkind_t " "kind" ", size_t " "size" );
.br
.BI "void *memtier_calloc(struct memtier_memory " "*memory" ", size_t " "num" ", size_t " "size" );
.br
.BI "void *memtier_kind_calloc(memkind_t " "kind" ", size_t " "num" ", size_t " "size" );
.br
.BI "void *memtier_realloc(struct memtier_memory " "*memory" ", void " "*ptr" ", size_t " "size" );
.br
.BI "void *memtier_kind_realloc(memkind_t " "kind" ", void " "*ptr" ", size_t " "size" );
.br
.BI "int memtier_posix_memalign(struct memtier_memory " "*memory" ", void " "**memptr" ", size_t " "alignment" ", size_t " "size" );
.br
.BI "int memtier_kind_posix_memalign(memkind_t " "kind" ", void " "**memptr" ", size_t " "alignment" ", size_t " "size" );
.br
.BI "size_t memtier_usable_size(void " "*ptr" );
.br
.BI "void memtier_free(void " "*ptr" );
.br
.BI "void memtier_kind_free(memkind_t " "kind" ", void " "*ptr" );
.br
.BI "size_t memtier_kind_allocated_size(memkind_t " "kind" );
.sp
.B "DECORATORS:"
.br
.BI "void memtier_kind_malloc_post(memkind_t " "kind" ", size_t " "size" ", void " "**result" );
.br
.BI "void memtier_kind_calloc_post(memkind_t " "kind" ", size_t " "nmemb" ", size_t " "size" ", void " "**result" );
.br
.BI "void memtier_kind_posix_memalign_post(memkind_t " "kind" ", void " "**memptr" ", size_t " "alignment" ", size_t " "size" ", int " "*err" );
.br
.BI "void memtier_kind_realloc_post(memkind_t " "*kind" ", void " "*ptr" ", size_t " "size" ", void " "**result" );
.br
.BI "void memtier_kind_free_pre(void " "**ptr" );
.br
.BI "void memtier_kind_usable_size_post(void " "**ptr" ", size_t " "size" );
.sp
.B "MEMTIER PROPERTY MANAGEMENT:
.br
.BI "int memtier_ctl_set(struct memtier_builder " "*builder" ", const char " "*name" ", const void " "*val" );
.sp
.br
.SH "CTL API"
.B TODO
.br
Supported names (with type):
policy.dynamic_threshold.thresholds[ID].val (size_t)
policy.dynamic_threshold.thresholds[ID].min (size_t)
policy.dynamic_threshold.thresholds[ID].max (size_t)
policy.dynamic_threshold.check_cnt (unsigned)
policy.dynamic_threshold.trigger (float)
policy.dynamic_threshold.degree (float)
.sp
.SH "DECORATORS"
.br
See section
.BR "DECORATORS"
of
.BR memkind (3)
for more details about decorators.
.SH "DESCRIPTION"
.SH "COPYRIGHT"
Copyright (C) 2021 Intel Corporation. All rights reserved.
.SH "SEE ALSO"
.BR memkind (3)
